Typical network servers, such as Web servers, video severs or file servers, as well as local operating systems, are designed to respond to client information or data requests as quickly as possible. Caching, or storing recently requested information, e.g., a data file, in memory buffers in anticipation of the next request, is a common approach used by network servers and local operating systems to decrease server response time.
For example, Web servers make heavy use of disk caches by storing recently requested HTML content in main memory buffers rather than on disk. This type of storage arrangement works well according to the locality-of-reference principle; namely, it is likely recently stored content will be requested again soon.
Packet-switched communications networks such as Ethernet-type local area networks (LANs) or the Internet are commonly used in host/host or server/client environments. Typically, previously requested information retrieved by a server is cached for ready access and throughput the next time that information is requested. However, even though the requested data is cached, each new request for the same or substantially the same data prompts the server to create new packets (including the cached data as the payload) to be sent to the network interface for transmission.
For example, with respect to Web servers, known systems cache the results of URL resolves (e.g., mapping a URL to a file on a disk) and cache HTTP response headers per document, which may contain an HTTP response such as an HTTP 200 OK response, the date of last change, and the like. Thus, in these known systems, caching of the static content (e.g., HTTP response header and body) may be performed. Static content is generally content that is the same for all clients.
In a typical server/client packet-switched communications network, a client may send a data request to a server. Based upon the client request, the server retrieves a data file from a hard drive or floppy disk, separates the data file into packets and sends the packets to the client in response. Prior to sending the packets, the server must allocate memory buffers, one for each packet, to temporarily store the response data. In this process, the server must copy the entire data file from the hard drive or disk to local memory, packetize the data and store each packet in separate buffers. Copying all of the bytes of the requested information along with header information into memory buffers takes a considerable amount of time.
Thus, while the aforementioned caching techniques may decrease response time in packet-switched communications networks and the like, there is still a need for an improved method and apparatus for reducing average network server response time and improved throughput in packet-switched networks.